And the last videos we have seen that investing in the S&P 500 index can be a pretty risky investment
where timing and market environment is actually key to success.
And we've also seen that there's kind of a time diversification effect.
So the longer the investment period the less volatile the overall performance as periods was poor returns
can be recovered by strong periods with positive returns.
And in this video we will create the ultimate visualization for this and the so-called return triangle.
And in this video we are actually starting with the final output the return triangle for the S&P 500
index.
And afterwards I will show you how to get the return triangle with some pretty simple python code.
Here we have the return triangle for the S&P 500 index.
And let's go first of all to the x axis.
So here we can see on the x axis the investment periods starting from one year and uh 30 years and we
can see here on the y axis the final year of investment are to say the year of divestment.
So for example let's have a look here at this.
Here we are a investment period the following year and the final year is 2000 and 18.
So actually the total investment period this year simply two thousand and eighteen and the salary is
for example the total year of 2017 to 16 and so on.
Then let's go here to an investment period of two years.
So here and this uh the final year is 2018 and therefore the total investment period covers the years
2017 and 2018 so let's randomly select this cell here.
Eleven point three percent.
And here we have an investment period of four years and the final year of investment is 2016.
And we can also find easily the initial year of investment if we go up here the diagonal.
So let's go the Sierra up and we can find us.
The very first year the year 2000 and 13.
So we actually started to invest here in uh January 2000 and 13 and the total investment period covers
the year 2013 14 15 and 16.
And actually on our return triangle we are working with a yearly lock returns.
That means that for each year from a nineteen hundred eighty nine.
So our triangle starts and the uh nineteen hundred eighty nine to 2018 we calculate the yearly lock
returns and for periods longer than one year we actually calculate the mean or the average sum of the
yearly lock returns.
So let's have an example here.
So here we have an investment period of two years and let's go into this year.
So here we have 5.2 percent and this is simply the average of the yearly lucky returns of 2000 and 18
and 17.
So this is actually the average of seventeen point seven and the minus seven point three percent.
And as a short recap the advantage of working with lock returns and the mean or the average of lock
returns is that it gives you the right indication whether you made gains or losses.
For the complete period.
So whenever the average lock return is negative and I sell we made losses over the whole period and
vice versa.
So with simple returns and the average of simple returns we actually cannot draw these conclusions with
100 percent certainty and we can also see here that the shorter the investment period the more riskier
is the investment.
For example if we only have a investment period of one year.
So this is quite versatile.
So for example here we have one year with a negative return of forty eight point six percent.
And in contrast we have also yes with the plus 20 plus 27 percent and so on.
And as we increase the investment period and as we go here more to the left hand side then we can see
here that the overall performance of the average yearly return gets less volatile.
So for example here we have an investment period of 20 years.
Then our overall our average performance is somewhere between three point five percent per year and
the seven point five percent.
And actually one of the most interesting question is So what is the longest time period in the history
where we still suffered losses and we can't see here.
We have an investment period of 13 years and here we have uh a negative return of uh minus 0 point 2
percent and starting with the investment period of 14 years.
We do not have any negative returns here.
So this is actually the worst example and we can go here and want to detail.
So if we go here the diagonal up there and we are ending here at the starting point in 2000.
So we invested here at the beginning of the year 2000 and we actually suffered the huge losses in the
early years and the year 2000 saw minus 10 percent and 2000 minus 14 percent in 2001 and so on and we
also participated here in the very poor year 2000 and 8.
And actually as a side note I have to say that yeah the return triangle is based on price returns only.
So without any dividends and if you include dividends then the returns will be higher a year and also
the maximum period where we still suffer losses might be shorter.
So for example it may be twelve or eleven years and you will have the opportunity to elaborate on this
in the exercises.
So this is the final output and now I will show you how to get this.
With only a few lines of Python code.